<template>
    <!-- *
        total: 必传
        pageSize：必传
        current-change：必须监听这个事件
        hidePaginat:  为 true 时， 列表中只有一条数据，隐藏分页器。
    * -->
    <div>
        <el-pagination @current-change="handleCurrentChange" :page-size="pageSize" layout="total, prev, pager, next, jumper"
            :total="total" :hide-on-single-page="hidePaginat">
        </el-pagination>
    </div>
</template>
<script>
export default {
    name: 'pagination-page',
    props: {
        total: {
            type: Number,
            default: 100,
            required: true
        },
        pageSize: {
            type: Number,
            default: 10,
            required: true
        },
        hidePaginat: {
            type: Boolean,
            default: false
        }
    },
    methods: {
        handleCurrentChange(numb) {
            this.$emit('handleCurrentChange', numb)
        }
    }
}
</script>
<style scoped></style>